package com.lxc.demos.android.view;

import com.lxc.demos.SampleApplication;

import android.content.Context;
import android.graphics.Canvas;
import android.util.AttributeSet;
import android.util.Log;
import android.view.KeyEvent;
import android.view.View;

public class SlipView extends View {
	
	public static String TAG = SampleApplication.instance.TAG;

	public SlipView(Context context) {
		
		super(context);
		Log.d(TAG,"<--SlipView(Context context)-->");
	}

	public SlipView(Context context, AttributeSet attrs, int defStyle) {

		super(context, attrs, defStyle);
		Log.d(TAG,"<--SlipView(Context context, AttributeSet attrs, int defStyle)-->");
	}

	public SlipView(Context context, AttributeSet attrs) {
		
		super(context, attrs);
		Log.d(TAG,"<--SlipView(Context context, AttributeSet attrs)-->");
	}

	@Override
	protected void onDraw(Canvas canvas) {
		Log.d(TAG,"<--SlipView.onDraw("+canvas+")-->");
		super.onDraw(canvas);
	}

	@Override
	public boolean onKeyDown(int keyCode, KeyEvent event) {
		Log.d(TAG,"<--SlipView.onKeyDown("+keyCode+","+event+")-->");
		return super.onKeyDown(keyCode, event);
	}

	/**
	 * Called to determine the size requirements for this view and all of its children.
	 */
	@Override
	protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
		Log.d(TAG,"<--SlipView.onMeasure("+widthMeasureSpec+","+heightMeasureSpec+")-->");
		super.onMeasure(widthMeasureSpec, heightMeasureSpec);
	}

	/**
	 * Called after a view and all of its children has been inflated from XML.
	 */
	@Override
	protected void onFinishInflate() {
		Log.d(TAG,"<--SlipView.onFinishInflate()-->");
		super.onFinishInflate();
	}

	/**
	 * Called when this view should assign a size and position to all of its children.
	 */
	@Override
	protected void onLayout(boolean changed, int left, int top, int right,
			int bottom) {
		Log.d(TAG,"<--SlipView.onLayout("+changed+","+left+","+top+","+right+","+bottom+")-->");
		super.onLayout(changed, left, top, right, bottom);
	}
	
	
	
	
	

}
